package bear.bear.annotation;

/** 使用注解测试类
 * @author LiuShanshan
 * @version V1.0
 * @Description
 */
@AnnotationDemo1("hello")
public class TestDemo1 {
    public static void main(String[] args) {
        // TestDemo1上是否有注解AnnotationDemo1
        boolean annotationPresent = TestDemo1.class.isAnnotationPresent(AnnotationDemo1.class);
        if(annotationPresent){
            AnnotationDemo1 annotation = TestDemo1.class.getAnnotation(AnnotationDemo1.class);
            System.out.println("注解里面的值:" + annotation.value());
        }
    }
}
